
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
/**
 * @author ckf
 * @create 2018 05 16 14:21
 * @desc   模拟三个老师同时分发80份学习笔记，每个老师相当于一个线程
 **/
public class homework3 {

    static class Teacher implements Runnable {
        @Override
        public void run() {

            for (int i = 1; i <= 80; i++) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName() + "在发发放");
            }
            System.out.println(Thread.currentThread().getName() + "***发放结束***");
        }
    }

    public static class Test3 {

        public static void main(String[] args) {
            Thread java = new Thread(new Teacher(), "JAVA笔记");
            Thread c = new Thread(new Teacher(), "C语言笔记");
            Thread shh = new Thread(new Teacher(), "SHH框架笔记");
            java.start();
            c.start();
            shh.start();
        }
    }
}
